3.1.35 \(\int (a+b (F^{g (e+f x)})^n)^2 \, dx\) [35]

Optimal. Leaf size=67 \[ a^2 x+\frac {2 a b \left (F^{g (e+f x)}\right )^n}{f g n \log (F)}+\frac {b^2 \left (F^{g (e+f x)}\right )^{2 n}}{2 f g n \log (F)} \]

[Out]

a^2*x+2*a*b*(F^(g*(f*x+e)))^n/f/g/n/ln(F)+1/2*b^2*(F^(g*(f*x+e)))^(2*n)/f/g/n/ln(F)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2320, 272, 45} \begin {gather*} a^2 x+\frac {2 a b \left (F^{g (e+f x)}\right )^n}{f g n \log (F)}+\frac {b^2 \left (F^{g (e+f x)}\right )^{2 n}}{2 f g n \log (F)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*(F^(g*(e + f*x)))^n)^2,x]

[Out]

a^2*x + (2*a*b*(F^(g*(e + f*x)))^n)/(f*g*n*Log[F]) + (b^2*(F^(g*(e + f*x)))^(2*n))/(2*f*g*n*Log[F])

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps

\begin {align*} \int \left (a+b \left (F^{g (e+f x)}\right )^n\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b x^n\right )^2}{x} \, dx,x,F^{g (e+f x)}\right )}{f g \log (F)}\\ &=\frac {\text {Subst}\left (\int \frac {(a+b x)^2}{x} \, dx,x,\left (F^{g (e+f x)}\right )^n\right )}{f g n \log (F)}\\ &=\frac {\text {Subst}\left (\int \left (2 a b+\frac {a^2}{x}+b^2 x\right ) \, dx,x,\left (F^{g (e+f x)}\right )^n\right )}{f g n \log (F)}\\ &=a^2 x+\frac {2 a b \left (F^{g (e+f x)}\right )^n}{f g n \log (F)}+\frac {b^2 \left (F^{g (e+f x)}\right )^{2 n}}{2 f g n \log (F)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 65, normalized size = 0.97 \begin {gather*} \frac {b \left (F^{g (e+f x)}\right )^n \left (4 a+b \left (F^{g (e+f x)}\right )^n\right )+2 a^2 \log \left (\left (F^{g (e+f x)}\right )^n\right )}{2 f g n \log (F)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*(F^(g*(e + f*x)))^n)^2,x]

[Out]

(b*(F^(g*(e + f*x)))^n*(4*a + b*(F^(g*(e + f*x)))^n) + 2*a^2*Log[(F^(g*(e + f*x)))^n])/(2*f*g*n*Log[F])

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 65, normalized size = 0.97

method result size
derivativedivides \(\frac {\frac {b^{2} \left (F^{g \left (f x +e \right )}\right )^{2 n}}{2}+2 a b \left (F^{g \left (f x +e \right )}\right )^{n}+a^{2} \ln \left (\left (F^{g \left (f x +e \right )}\right )^{n}\right )}{g f \ln \left (F \right ) n}\) \(65\)
default \(\frac {\frac {b^{2} \left (F^{g \left (f x +e \right )}\right )^{2 n}}{2}+2 a b \left (F^{g \left (f x +e \right )}\right )^{n}+a^{2} \ln \left (\left (F^{g \left (f x +e \right )}\right )^{n}\right )}{g f \ln \left (F \right ) n}\) \(65\)
norman \(a^{2} x +\frac {b^{2} {\mathrm e}^{2 n \ln \left ({\mathrm e}^{g \left (f x +e \right ) \ln \left (F \right )}\right )}}{2 n g f \ln \left (F \right )}+\frac {2 a b \,{\mathrm e}^{n \ln \left ({\mathrm e}^{g \left (f x +e \right ) \ln \left (F \right )}\right )}}{n g f \ln \left (F \right )}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*(F^(g*(f*x+e)))^n)^2,x,method=_RETURNVERBOSE)

[Out]

1/g/f/ln(F)/n*(1/2*b^2*((F^(g*(f*x+e)))^n)^2+2*a*b*(F^(g*(f*x+e)))^n+a^2*ln((F^(g*(f*x+e)))^n))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 64, normalized size = 0.96 \begin {gather*} a^{2} x + \frac {2 \, F^{{\left (f x + e\right )} g n} a b}{f g n \log \left (F\right )} + \frac {F^{2 \, {\left (f x + e\right )} g n} b^{2}}{2 \, f g n \log \left (F\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(F^(g*(f*x+e)))^n)^2,x, algorithm="maxima")

[Out]

a^2*x + 2*F^((f*x + e)*g*n)*a*b/(f*g*n*log(F)) + 1/2*F^(2*(f*x + e)*g*n)*b^2/(f*g*n*log(F))

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 63, normalized size = 0.94 \begin {gather*} \frac {2 \, a^{2} f g n x \log \left (F\right ) + 4 \, F^{f g n x + g n e} a b + F^{2 \, f g n x + 2 \, g n e} b^{2}}{2 \, f g n \log \left (F\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(F^(g*(f*x+e)))^n)^2,x, algorithm="fricas")

[Out]

1/2*(2*a^2*f*g*n*x*log(F) + 4*F^(f*g*n*x + g*n*e)*a*b + F^(2*f*g*n*x + 2*g*n*e)*b^2)/(f*g*n*log(F))

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 92, normalized size = 1.37 \begin {gather*} a^{2} x + \begin {cases} \frac {4 a b f g n \left (F^{g \left (e + f x\right )}\right )^{n} \log {\left (F \right )} + b^{2} f g n \left (F^{g \left (e + f x\right )}\right )^{2 n} \log {\left (F \right )}}{2 f^{2} g^{2} n^{2} \log {\left (F \right )}^{2}} & \text {for}\: f^{2} g^{2} n^{2} \log {\left (F \right )}^{2} \neq 0 \\x \left (2 a b + b^{2}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(F**(g*(f*x+e)))**n)**2,x)

[Out]

a**2*x + Piecewise(((4*a*b*f*g*n*(F**(g*(e + f*x)))**n*log(F) + b**2*f*g*n*(F**(g*(e + f*x)))**(2*n)*log(F))/(
2*f**2*g**2*n**2*log(F)**2), Ne(f**2*g**2*n**2*log(F)**2, 0)), (x*(2*a*b + b**2), True))

________________________________________________________________________________________

Giac [A]
time = 3.01, size = 77, normalized size = 1.15 \begin {gather*} \frac {4 \, F^{f g n x} F^{g n e} a b + F^{2 \, f g n x} F^{2 \, g n e} b^{2} + 2 \, a^{2} \log \left ({\left | F \right |}^{f g n x} {\left | F \right |}^{g n e}\right )}{2 \, f g n \log \left (F\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*(F^(g*(f*x+e)))^n)^2,x, algorithm="giac")

[Out]

1/2*(4*F^(f*g*n*x)*F^(g*n*e)*a*b + F^(2*f*g*n*x)*F^(2*g*n*e)*b^2 + 2*a^2*log(abs(F)^(f*g*n*x)*abs(F)^(g*n*e)))
/(f*g*n*log(F))

________________________________________________________________________________________

Mupad [B]
time = 3.72, size = 75, normalized size = 1.12 \begin {gather*} \frac {\frac {b^2\,{\left (F^{e\,g+f\,g\,x}\right )}^{2\,n}}{2}+2\,a\,b\,{\left (F^{e\,g+f\,g\,x}\right )}^n}{f\,g\,n\,\ln \left (F\right )}+\frac {a^2\,\ln \left (F^{g\,\left (e+f\,x\right )}\right )}{f\,g\,\ln \left (F\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*(F^(g*(e + f*x)))^n)^2,x)

[Out]

((b^2*(F^(e*g + f*g*x))^(2*n))/2 + 2*a*b*(F^(e*g + f*g*x))^n)/(f*g*n*log(F)) + (a^2*log(F^(g*(e + f*x))))/(f*g
*log(F))

________________________________________________________________________________________